home *** CD-ROM | disk | FTP | other *** search
/ The Perfect PC - Ultimate Utilities / The Perfect PC - The Multimedia Compliment to PC Magazine - Ultimate Utilities (Ziff-Davis)(Volume 4 Number 2)(1996).ISO / zdbench / wb96 / uninstal.ba_ / uninstal.ba
Text File  |  1995-11-12  |  3KB  |  119 lines

  1. @ECHO OFF
  2. REM Copyright (c) 1994-1995 by Ziff-Davis Publishing Company.
  3. REM All rights reserved.
  4.  
  5. GOTO SETVARS
  6.  
  7. :START
  8.  
  9. IF "%WBDRIVE%" == "" GOTO NOENV
  10. IF "%WBDIR%" == "" GOTO NOENV
  11. IF "%SYSDIR%" == "" GOTO NOENV
  12. IF "%WINDIR%" == "" GOTO NOENV
  13. IF "%NAMEVERSION%" == "" GOTO NOENV
  14. IF "%NAME%" == "" GOTO NOENV
  15. IF "%INIFILE%" == "" GOTO NOENV
  16.  
  17. IF "%1" == "copied" GOTO OK
  18.  
  19. IF EXIST %WBDRIVE%:\~WBUNINS.BAT DEL %WBDRIVE%:\~WBUNINS.BAT
  20. COPY %WBDIR%\UNINSTAL.BAT %WBDRIVE%:\~WBUNINS.BAT > NUL
  21. %WBDRIVE%:\~WBUNINS.BAT copied
  22.  
  23. :OK
  24.  
  25. ECHO %NAMEVERSION% Uninstall
  26. ECHO.
  27. ECHO This script will attempt to delete the %NAME%
  28. ECHO directory %WBDIR%.
  29. ECHO.
  30. ECHO The script will delete all the files %NAME% installed.
  31. ECHO If you have added other files to the %NAME% directory,
  32. ECHO the script will not delete those files and the
  33. ECHO %NAME% directory.
  34. ECHO.
  35. ECHO Press CTRL/BREAK to abort this script, or any other key to
  36. ECHO uninstall %NAME%.
  37. ECHO.
  38. PAUSE
  39.  
  40. ECHO.
  41. ECHO Removing the %INIFILE% file ....
  42.  
  43. IF EXIST %WINDIR%\%INIFILE% DEL %WINDIR%\%INIFILE%
  44.  
  45. ECHO.
  46. ECHO Removing the %NAME% directory %WBDIR% ...
  47.  
  48. %WBDRIVE%:
  49. CD %WBDIR%
  50.  
  51. FOR %%u IN (UNEXT*.BAT) DO CALL %%u
  52. FOR %%u IN (UNEXT*.BAT) DO ZERO %%u
  53. FOR %%u IN (UNEXT*.BAT) DO DEL %%u
  54.  
  55. GOTO ERASEFILES
  56.  
  57. :REMOVEDIRS
  58. IF EXIST DISCLOSE.INI DEL DISCLOSE.INI
  59. IF NOT EXIST SUITES\*.* RMDIR SUITES
  60. IF NOT EXIST EXPORTS\*.* RMDIR EXPORTS
  61. IF EXIST SUITES\*.* GOTO FAILED
  62. IF EXIST EXPORTS\*.* GOTO FAILED
  63. IF EXIST RESULTS.ZDB\*.* GOTO FAILED
  64. IF EXIST *.* GOTO FAILED
  65. CD ..
  66. RMDIR %WBDIR%
  67.  
  68. GOTO SUCCESS
  69.  
  70. :FAILED
  71.  
  72. ECHO.
  73. ECHO This script did not completely remove the %NAME%
  74. ECHO directory because it contains additional files
  75. ECHO %NAME% did not install or a database directory.
  76. ECHO You should manually delete the extra files and
  77. ECHO then delete the %NAME% directory.
  78. GOTO COMMON
  79.  
  80. :SUCCESS
  81. ECHO.
  82. ECHO %NAME% has been removed from your system.
  83. GOTO COMMON
  84.  
  85. :COMMON
  86. ECHO.
  87. ECHO This script did not remove the BWCC.DLL and CTL3DV2.DLL
  88. ECHO libraries from the Windows system directory. (You should
  89. ECHO not remove these files, as applications installed before
  90. ECHO or after %NAME% may also be using them.)
  91. ECHO.
  92. ECHO You should manually delete the %NAME% icons in the
  93. ECHO Ziff-Davis Benchmarks program group.
  94. ECHO.
  95. ECHO You should also delete this script using the command:
  96. ECHO   DEL %WBDRIVE%:\~WBUNINS.BAT
  97. ECHO.
  98. GOTO DONE
  99.  
  100. :NOENV
  101.  
  102. ECHO.
  103. ECHO You must increase the amount of available environment
  104. ECHO variable space before you can run this program.
  105. ECHO.
  106. ECHO Edit the CONFIG.SYS file so that it contains the line:
  107. ECHO.
  108. ECHO   Shell=C:\COMMAND.COM /E:512 /P
  109. ECHO.
  110. ECHO or increase the /E: value if it already exists.
  111. ECHO.
  112. ECHO If you are running UNINSTAL.BAT from within Windows,
  113. ECHO run the UNINSTAL.PIF file instead.  It may provide
  114. ECHO more environment space.
  115. ECHO.
  116. GOTO DONE
  117.  
  118. GOTO REMOVEDIRS
  119.